﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.Json.Serialization;

namespace Model
{
    //用户表
    public class User
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        //用户id
        public int UserId { get; set; }
        //分组id
        public int GroupId { get; set; }
        //性别 男1 女0
        public Boolean Gender { get; set; }
        //用户名称
        public string UserName { get; set; }
        //用户手机
        public string UserPhone { get; set; }
        //用户密码
        public string Pwd { get; set; }
        //用户头像
        public string UserHead { get; set; }
        //软删除
        public Boolean IsDelete { get; set; }
        //创建时间
        public DateTime CreateTime { get; set; } = DateTime.Now;
        //更新时间
        public DateTime UpdateTime { get; set; } = DateTime.Now;

        //导航属性
        [JsonIgnore]
        //指向Group
        public Group Group { get; set; }
        //指向UserClass
        public List<UserClass> UserClasses { get; set; }

    }
}
